<template>
  <el-dialog title="卡片解绑" :visible.sync="dialogVisible" :close-on-click-modal="false"
             :close-on-press-escape="false" :before-close="handleClose" @close="$emit('update:visible',false)">
    <div class="cartId">
      <p class="mb-10"><i class="el-icon-warning-outline"></i>卡片解绑，请先将新的卡片放置读卡器，进行读取新卡ID</p>
      <el-input v-model="idCart" placeholder="请输入内容"></el-input>
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button @click.native="resetForm" size="small">取消</el-button>
      <el-button type="primary" @click.native="editSubmit" size="small">提交</el-button>
    </div>
  </el-dialog>
</template>
<script>
  import api from '@/utils/api.js'

  export default {
    name: 'Dialog',
    props: ['visible'],
    watch: {
      visible () {
        this.dialogVisible = this.visible
      }
    },
    data () {
      return {
        dialogVisible: null,
        idCart: ''
      }
  },
    created () {
    },
    methods: {
      editSubmit () {
        this.dialogVisible = false
      },
      handleClose () {

      },
      // 关闭弹窗之前执行
      handleClose () {
        this.dialogVisible = false
      },
      resetForm () {
        this.dialogVisible = false
      }
    }
  }
</script>

